Optimal. Leaf size=165 \[ \frac {35 a x}{128}+\frac {a \tanh ^{-1}(\sin (c+d x))}{d}-\frac {a \sin (c+d x)}{d}-\frac {35 a \cos (c+d x) \sin (c+d x)}{128 d}-\frac {a \sin ^3(c+d x)}{3 d}-\frac {35 a \cos (c+d x) \sin ^3(c+d x)}{192 d}-\frac {a \sin ^5(c+d x)}{5 d}-\frac {7 a \cos (c+d x) \sin ^5(c+d x)}{48 d}-\frac {a \sin ^7(c+d x)}{7 d}-\frac {a \cos (c+d x) \sin ^7(c+d x)}{8 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.11, antiderivative size = 165, normalized size of antiderivative = 1.00, number of steps
used = 11, number of rules used = 7, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.368, Rules used = {3957, 2917,
2672, 308, 212, 2715, 8} \begin {gather*} -\frac {a \sin ^7(c+d x)}{7 d}-\frac {a \sin ^5(c+d x)}{5 d}-\frac {a \sin ^3(c+d x)}{3 d}-\frac {a \sin (c+d x)}{d}+\frac {a \tanh ^{-1}(\sin (c+d x))}{d}-\frac {a \sin ^7(c+d x) \cos (c+d x)}{8 d}-\frac {7 a \sin ^5(c+d x) \cos (c+d x)}{48 d}-\frac {35 a \sin ^3(c+d x) \cos (c+d x)}{192 d}-\frac {35 a \sin (c+d x) \cos (c+d x)}{128 d}+\frac {35 a x}{128} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 212
Rule 308
Rule 2672
Rule 2715
Rule 2917
Rule 3957
Rubi steps
\begin {align*} \int (a+a \sec (c+d x)) \sin ^8(c+d x) \, dx &=-\int (-a-a \cos (c+d x)) \sin ^7(c+d x) \tan (c+d x) \, dx\\ &=a \int \sin ^8(c+d x) \, dx+a \int \sin ^7(c+d x) \tan (c+d x) \, dx\\ &=-\frac {a \cos (c+d x) \sin ^7(c+d x)}{8 d}+\frac {1}{8} (7 a) \int \sin ^6(c+d x) \, dx+\frac {a \text {Subst}\left (\int \frac {x^8}{1-x^2} \, dx,x,\sin (c+d x)\right )}{d}\\ &=-\frac {7 a \cos (c+d x) \sin ^5(c+d x)}{48 d}-\frac {a \cos (c+d x) \sin ^7(c+d x)}{8 d}+\frac {1}{48} (35 a) \int \sin ^4(c+d x) \, dx+\frac {a \text {Subst}\left (\int \left (-1-x^2-x^4-x^6+\frac {1}{1-x^2}\right ) \, dx,x,\sin (c+d x)\right )}{d}\\ &=-\frac {a \sin (c+d x)}{d}-\frac {a \sin ^3(c+d x)}{3 d}-\frac {35 a \cos (c+d x) \sin ^3(c+d x)}{192 d}-\frac {a \sin ^5(c+d x)}{5 d}-\frac {7 a \cos (c+d x) \sin ^5(c+d x)}{48 d}-\frac {a \sin ^7(c+d x)}{7 d}-\frac {a \cos (c+d x) \sin ^7(c+d x)}{8 d}+\frac {1}{64} (35 a) \int \sin ^2(c+d x) \, dx+\frac {a \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\sin (c+d x)\right )}{d}\\ &=\frac {a \tanh ^{-1}(\sin (c+d x))}{d}-\frac {a \sin (c+d x)}{d}-\frac {35 a \cos (c+d x) \sin (c+d x)}{128 d}-\frac {a \sin ^3(c+d x)}{3 d}-\frac {35 a \cos (c+d x) \sin ^3(c+d x)}{192 d}-\frac {a \sin ^5(c+d x)}{5 d}-\frac {7 a \cos (c+d x) \sin ^5(c+d x)}{48 d}-\frac {a \sin ^7(c+d x)}{7 d}-\frac {a \cos (c+d x) \sin ^7(c+d x)}{8 d}+\frac {1}{128} (35 a) \int 1 \, dx\\ &=\frac {35 a x}{128}+\frac {a \tanh ^{-1}(\sin (c+d x))}{d}-\frac {a \sin (c+d x)}{d}-\frac {35 a \cos (c+d x) \sin (c+d x)}{128 d}-\frac {a \sin ^3(c+d x)}{3 d}-\frac {35 a \cos (c+d x) \sin ^3(c+d x)}{192 d}-\frac {a \sin ^5(c+d x)}{5 d}-\frac {7 a \cos (c+d x) \sin ^5(c+d x)}{48 d}-\frac {a \sin ^7(c+d x)}{7 d}-\frac {a \cos (c+d x) \sin ^7(c+d x)}{8 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.22, size = 106, normalized size = 0.64 \begin {gather*} \frac {a \left (107520 \tanh ^{-1}(\sin (c+d x))-107520 \sin (c+d x)-35840 \sin ^3(c+d x)-21504 \sin ^5(c+d x)-15360 \sin ^7(c+d x)+35 (840 c+840 d x-672 \sin (2 (c+d x))+168 \sin (4 (c+d x))-32 \sin (6 (c+d x))+3 \sin (8 (c+d x)))\right )}{107520 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.17, size = 116, normalized size = 0.70
method | result | size |
derivativedivides | \(\frac {a \left (-\frac {\left (\sin ^{7}\left (d x +c \right )\right )}{7}-\frac {\left (\sin ^{5}\left (d x +c \right )\right )}{5}-\frac {\left (\sin ^{3}\left (d x +c \right )\right )}{3}-\sin \left (d x +c \right )+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )+a \left (-\frac {\left (\sin ^{7}\left (d x +c \right )+\frac {7 \left (\sin ^{5}\left (d x +c \right )\right )}{6}+\frac {35 \left (\sin ^{3}\left (d x +c \right )\right )}{24}+\frac {35 \sin \left (d x +c \right )}{16}\right ) \cos \left (d x +c \right )}{8}+\frac {35 d x}{128}+\frac {35 c}{128}\right )}{d}\) | \(116\) |
default | \(\frac {a \left (-\frac {\left (\sin ^{7}\left (d x +c \right )\right )}{7}-\frac {\left (\sin ^{5}\left (d x +c \right )\right )}{5}-\frac {\left (\sin ^{3}\left (d x +c \right )\right )}{3}-\sin \left (d x +c \right )+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )+a \left (-\frac {\left (\sin ^{7}\left (d x +c \right )+\frac {7 \left (\sin ^{5}\left (d x +c \right )\right )}{6}+\frac {35 \left (\sin ^{3}\left (d x +c \right )\right )}{24}+\frac {35 \sin \left (d x +c \right )}{16}\right ) \cos \left (d x +c \right )}{8}+\frac {35 d x}{128}+\frac {35 c}{128}\right )}{d}\) | \(116\) |
risch | \(\frac {35 a x}{128}+\frac {93 i a \,{\mathrm e}^{i \left (d x +c \right )}}{128 d}-\frac {93 i a \,{\mathrm e}^{-i \left (d x +c \right )}}{128 d}+\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{d}+\frac {a \sin \left (8 d x +8 c \right )}{1024 d}+\frac {a \sin \left (7 d x +7 c \right )}{448 d}-\frac {a \sin \left (6 d x +6 c \right )}{96 d}-\frac {9 a \sin \left (5 d x +5 c \right )}{320 d}+\frac {7 a \sin \left (4 d x +4 c \right )}{128 d}+\frac {37 a \sin \left (3 d x +3 c \right )}{192 d}-\frac {7 a \sin \left (2 d x +2 c \right )}{32 d}\) | \(180\) |
norman | \(\frac {\frac {35 a x}{128}-\frac {163 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{64 d}-\frac {1335 a \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{64 d}-\frac {24223 a \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{320 d}-\frac {359453 a \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2240 d}-\frac {724649 a \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6720 d}-\frac {45859 a \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{960 d}-\frac {2395 a \left (\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{192 d}-\frac {93 a \left (\tan ^{15}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{64 d}+\frac {35 a x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{16}+\frac {245 a x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{32}+\frac {245 a x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{16}+\frac {1225 a x \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{64}+\frac {245 a x \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{16}+\frac {245 a x \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{32}+\frac {35 a x \left (\tan ^{14}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{16}+\frac {35 a x \left (\tan ^{16}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{128}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{8}}+\frac {a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}-\frac {a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}\) | \(312\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 127, normalized size = 0.77 \begin {gather*} -\frac {512 \, {\left (30 \, \sin \left (d x + c\right )^{7} + 42 \, \sin \left (d x + c\right )^{5} + 70 \, \sin \left (d x + c\right )^{3} - 105 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 105 \, \log \left (\sin \left (d x + c\right ) - 1\right ) + 210 \, \sin \left (d x + c\right )\right )} a - 35 \, {\left (128 \, \sin \left (2 \, d x + 2 \, c\right )^{3} + 840 \, d x + 840 \, c + 3 \, \sin \left (8 \, d x + 8 \, c\right ) + 168 \, \sin \left (4 \, d x + 4 \, c\right ) - 768 \, \sin \left (2 \, d x + 2 \, c\right )\right )} a}{107520 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.14, size = 123, normalized size = 0.75 \begin {gather*} \frac {3675 \, a d x + 6720 \, a \log \left (\sin \left (d x + c\right ) + 1\right ) - 6720 \, a \log \left (-\sin \left (d x + c\right ) + 1\right ) + {\left (1680 \, a \cos \left (d x + c\right )^{7} + 1920 \, a \cos \left (d x + c\right )^{6} - 7000 \, a \cos \left (d x + c\right )^{5} - 8448 \, a \cos \left (d x + c\right )^{4} + 11410 \, a \cos \left (d x + c\right )^{3} + 15616 \, a \cos \left (d x + c\right )^{2} - 9765 \, a \cos \left (d x + c\right ) - 22528 \, a\right )} \sin \left (d x + c\right )}{13440 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.47, size = 174, normalized size = 1.05 \begin {gather*} \frac {3675 \, {\left (d x + c\right )} a + 13440 \, a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 13440 \, a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (9765 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{15} + 83825 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{13} + 321013 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{11} + 724649 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 1078359 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 508683 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 140175 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 17115 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{8}}}{13440 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.14, size = 150, normalized size = 0.91 \begin {gather*} \frac {35\,a\,x}{128}+\frac {2\,a\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}-\frac {7\,a\,\sin \left (2\,c+2\,d\,x\right )}{32\,d}+\frac {37\,a\,\sin \left (3\,c+3\,d\,x\right )}{192\,d}+\frac {7\,a\,\sin \left (4\,c+4\,d\,x\right )}{128\,d}-\frac {9\,a\,\sin \left (5\,c+5\,d\,x\right )}{320\,d}-\frac {a\,\sin \left (6\,c+6\,d\,x\right )}{96\,d}+\frac {a\,\sin \left (7\,c+7\,d\,x\right )}{448\,d}+\frac {a\,\sin \left (8\,c+8\,d\,x\right )}{1024\,d}-\frac {93\,a\,\sin \left (c+d\,x\right )}{64\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________